-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duplicate external file type issue when change language and other corresponding issue of external file type preferences #10496
Conversation
…tExternalFileTypeEntryDialog class
There are failing tests |
thanks for your feedback, I will follow up soon later this week. |
This issue is JabRef/JabRefOnline#2136 - I think, you linked the wrong number. Can you check? |
Ah, it is #10271 (not #10127 - numbers swapped) - I fixed it in the PR descriptoin, too. |
@papatekken Would it be possible to add tests to |
OpenRewrite complains because of style - see the failing "Tests / Code style check" at https://github.com/JabRef/jabref/actions/runs/6593745520/job/17916664973?pr=10496. Please run |
@koppor sorry for mix up the number. I followed the documentation and tried checkStyle plugin locally but all passed. Anyway I will try to run rewriteRun and see if that can help. I will add the test as you suggested too. Thanks for your comments. |
No worries. -- We have some more steps in there. See jabref/.github/workflows/tests.yml Line 63 in 1fb17d3
We did not mention that in the documentation. I am trying to get a bot commenting on the PR to guide more. See #10532. Updating the documentation is future work :). |
Time is currently shor tin our side. May I ask for a test of |
Sure, I planned to do so, now I target to complete test before Monday hope this is ok, thanks |
src/main/java/org/jabref/gui/preferences/externalfiletypes/EditExternalFileTypeEntryDialog.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Known file type added. I am not able to submit (which is OK). However, there should be an error indicator shown at the text field causing the issue. I think, this is difficult to implement, thus, OK for me.
- If I edit an entry and re-use an existing mime-type (2.g.,
image/vnd.djvu
). I can still submit. Mime types are globally unique. Thus, would it be possible to add a check for that? - If I edit an entry - and use an existing name (e.g., CHM), I can still submit. Thus, would it be possible to add a check for that?
Otherwise: Looks good to me!
} | ||
return true; | ||
}, | ||
ValidationMessage.error(Localization.lang("There is already an exists extension with the same name.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do I see these messages? I did not see them here? @Siedlerchr Do we need to change something in the overall code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@koppor
I following the code from GroupDialogViewModel.java.
In that class there is a function validationHandler. However even with that function I still cannot see the error message, so I didnt include that.
No problem, I will add unique validation for name and mime-type as well. For error message, I am not sure at the moment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it out. Works good. I will ask @Siedlerchr about the validation messages.
thanks @Siedlerchr , I get it now, and it's good to learn something new |
In Preferences->External file types,
*Notify message was added but no translation done.
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)